package cn.gz.ibix.bean;

import com.google.gson.GsonBuilder;

/**
 * 项目名称：YiDianCanAPP
 * <br>类描述：
 * <br>创建人：htliu
 * <br>创建时间：2018/4/18 9:31
 * <br>修改人:
 * <br>修改时间：2018/4/18 9:31
 * <br>修改备注：
 * <br>@version
 */

public class FromJsonUtils {
    public static ResultData fromJson(String json, Class clazz) {
        return new GsonBuilder()
                .registerTypeAdapter(ResultData.class, new JsonFormatParser(clazz))
                .enableComplexMapKeySerialization()
                .serializeNulls()
                .create()
                .fromJson(json, ResultData.class);
    }
}
